require('styles/Block.less')
import React from 'react'

class Block extends React.Component{
  render(){
    let {title, children} = this.props
    return (
      <div className="cpn-block">
        <h1 className="block-title">
          {title}【{React.Children.count(children)}】
        </h1>
        <div className="block-content">
          {children}
        </div>
      </div>
    )
  }
}

Block.propTypes = {
  title: React.PropTypes.string.isRequired
}

export default Block
